/**
 * 登录注册相关reducer
 */
const initial = {
  userInfo: null
}

export const auth = (state = initial, action) => {
  switch (action.type) {
    case 'SAVE_USER_INFO':
      return { userInfo: action.data.data }
    case 'CLEAN_USER_INFO':
      return { userInfo: null }
  }
  return state;
}
